package com.rf.vo;


/**
 * @Description
 * @Author rf
 * @Date 2022/4/2
 */

public class ResponseVo {
    private String code;
    private String msg;
    private Object data;

    public static ResponseVo SUCCESS = new ResponseVo("200","success",null);

    public static ResponseVo FAIL = new ResponseVo("500","fail",null);

    public static ResponseVo SUCCESS(Object data){
        return new ResponseVo("200","success",data);
    }
    public static ResponseVo FAIL(Object data){
        return new ResponseVo("500","fail",data);
    }


    public ResponseVo() {
    }

    public ResponseVo(String code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static ResponseVo getSUCCESS() {
        return SUCCESS;
    }

    public static void setSUCCESS(ResponseVo SUCCESS) {
        ResponseVo.SUCCESS = SUCCESS;
    }

    public static ResponseVo getFAIL() {
        return FAIL;
    }

    public static void setFAIL(ResponseVo FAIL) {
        ResponseVo.FAIL = FAIL;
    }
}
